<?php
$block_handler = icms::handler('icms_view_block');
$blockObj = $block_handler->get($block_id);

$template = new icms_view_Tpl();
$block = array(
	'id'        => $blockObj->getVar( 'bid' ),
	'module'    => $blockObj->getVar( 'dirname' ),
	'title'     => $blockObj->getVar( 'title' ),
	'weight'    => $blockObj->getVar( 'weight' ),
	'lastmod'   => $blockObj->getVar( 'last_modified' ),
);
$tplName = ( $tplName = $blockObj->getVar('template') ) ? "db:$tplName" : "db:system_block_dummy.html";
if ( $bresult = $blockObj->buildBlock() ) {
	$template->assign( 'block', $bresult );
	$block['content'] = $template->fetch($tplName);
} else {
	$block = FALSE;
}
$this->assign('block', $block);
?>